import { getRequest, postRequest, putRequest, deleteRequest } from '@/utils/request';
/**
 * 维修工单*/
// 创建
export const machineManagerRepairOrderCreate = (data) => postRequest('/machinemanager/repair-order/create', data);

// 更新
export const machineManagerRepairOrderUpdate = (data) => putRequest('/machinemanager/repair-order/update', data);

// 删除
export const machineManagerRepairOrderDelete = (params) => deleteRequest('/machinemanager/repair-order/delete', params);

// 获得
export const machineManagerRepairOrderGet = (params) => getRequest('/machinemanager/repair-order/get', params);

// 分页
export const machineManagerRepairOrderPage = (params) => getRequest('/machinemanager/repair-order/page', params);
export const machineManagerRepairOrderHistoryPage = (params) => getRequest('/machinemanager/repair-order/history-page', params);

export const machineManagerRepairOrderUpdateAuditState = (data) => postRequest('/machinemanager/repair-order/update-audit-state', data);

export const machineManagerRepairOrderCount = (params) => getRequest('/machinemanager/repair-order/count', params);
export const machineManagerRepairOrderWeeksCount = (params) => getRequest('/machinemanager/repair-order/weeks-count', params);
// 接单
export const machineManagerRepairOrderTaking = (data) => postRequest('/machinemanager/repair-order/taking', data);
export const machineManagerRepairOrderClearTaking = (data) => postRequest('/machinemanager/repair-order/clear-taking', data);

// 维修状态及条数
export const machineManagerRepairOrderGetStateCount = (params) => postRequest('/machinemanager/repair-order/get-state-count', params);

// 完成维修
export const machineManagerRepairOrderComplete = (data) => postRequest('/machinemanager/repair-order/complete', data);
export const machineManagerRepairOrderClearComplete = (data) => postRequest('/machinemanager/repair-order/clear-complete', data);
